package com.apache.security.util;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

/**
 *
 */
public class SecurityHttpServletResponse extends HttpServletResponseWrapper {

	public SecurityHttpServletResponse(HttpServletResponse response) {
		super(response);
	}

	public void setDateHeader(String name, long date) {
		super.setDateHeader(ResponseHeaderSecurityCheck.filterCLRF(name), date);
	}

	public void setIntHeader(String name, int value) {
		super.setIntHeader(ResponseHeaderSecurityCheck.filterCLRF(name), value);
	}

	public void addHeader(String name, String value) {
		super.addHeader(ResponseHeaderSecurityCheck.filterCLRF(name),
				XssUtil.xssFilter(ResponseHeaderSecurityCheck.filterCLRF(value), null));
	}

	public void setHeader(String name, String value) {
		super.setHeader(ResponseHeaderSecurityCheck.filterCLRF(name),
				XssUtil.xssFilter(ResponseHeaderSecurityCheck.filterCLRF(value), null));
	}
}
